All Questions
Tagged with asp.net-mvc-validationjquery
19 questions
0votes
1answer
1kviews
MVC 5 - can not get globalisation running
I want to add globalization because the site asks the user for a date. And my german user want to type "31.12.1966" and not "1966-12-31". So I add the nuget-Packages "jQuery.Validation.Globalize" and ...
3votes
2answers
1kviews
Change ASP.NET MVC validation dynamically in Jquery
On one of the view model fields, I have set the min length in ASP.NET MVC Data Annotation attribute. [MinLength(5, ErrorMessage = "A minimum of 5 digits is required")] Based on a dropdown selection(...
0votes
0answers
102views
ASP.Net MVC: custom client side validation for checkboxes is not working [duplicate]
basically i am showing checkboxes in page and checkboxes generated in loop. i have create a custom validation using this ValidationAttribute, IClientValidatable my server side validation working fine ...
0votes
0answers
322views
ASP.Net MVC: How to show validation message when working multiple checkboxes [duplicate]
i am showing many check boxes in loop and i want when user submit form then user has to select at least one checkbox. if no check box is selected then validation message will show at client side and ...
0votes
0answers
1kviews
How do you keep MVC validation messages from disappearing when you click on another field?
I have a asp.net MVC/Razor project. One of the views has a series of dropdowns. When you select an option from the dropdown, javascript code checks to see if the option has already been selected by ...
0votes
1answer
1kviews
How do you find the div that contains a input field with validation error using MVC validation?
I have a mobile version of a website that has multiple "pages". These five pages are all in one view made up of divs that are hidden/shown as they progress from one to another. So when you first ...
0votes
1answer
762views
Unable to call MVC4 client side validation while using jquery AJAX call
In my MVC view screen, on click of button, i do ajax call through $.ajax and it able to call controller's action method and return the reponse into success event. controller action method's return ...
0votes
0answers
293views
Submit button not in form collection when using MVC Client validation
I have a view with client mvc validation activated and some input type=submit buttons. I don't use ajax. <input name="Save" class="btnSave" type="submit" /> Fails : When i click one of the ...
1vote
1answer
3kviews
ASP.NET MVC4 - Hidden field validation not clearing after value is set
I have a hidden field on my form that is required. The hidden field is populated when a user selects a value from a textbox using jQuery UI autocomplete. I have setup my form validator to not ignore ...
0votes
1answer
274views
Razor generates different HTML after published to a shared host
Model class: public class MyClass { ...... [MaxLength(9), Required, DisplayName("Social security number")] [RegularExpression(@"\d{3}-\d\d-\d{4}", ErrorMessage = "Invalid social ...
1vote
0answers
321views
Client validation not working on the shared host but works when debugging
I had the following property in model class: [MaxLength(9), Required, DisplayName("Social security number")] [RegularExpression(@"\d{3}-\d\d-\d{4}", ErrorMessage = "Invalid social security number")] ...
2votes
1answer
1kviews
ASP.NET MVC 2 validation on dynamic page
I have registration wizard on my asp.net mvc 2 application with multiple pages. On the first page I should have basic data form of persons involved in the process. I should have 3 text boxes labeled ...
2votes
2answers
4kviews
MVC Client Side Validation doing database check
Is there a way how to perform a "database" check through the Client Side Validation in MVC? I have the following class public class EmailCheck : ValidationAttribute,IClientValidatable { ...
2votes
2answers
3kviews
MVC 3 - Set non-required field to required at the client side
I'm building an MVC 3 application. Can I set a non-required field to required in the client-side(using JavaScript / jQuery)? I need it to be dynamically when things change in the page. UPDATE: I ...
9votes
4answers
15kviews
Validating File Upload - Jquery and "Accept" attribute
I am using a form to upload a file. I want only PDF files to be uploaded. This is my code: A input box to allow the user to choose a file: @Html.FileBox(m => m.FileName, new { id = "FileName", ...